strengthen pyright detection#38
Open
robin523790 wants to merge 6 commits into
Open
Conversation
Bumped minimum Python version to `>=3.10` (previously: `>=3.9` which reached end-of-life). Added `CHANGELOG.md`. Removed `version.py`.
…uous fields in construct definitions.
…ed(lambda ctx: 50))`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Above code did not trigger a Pyright error but failed at runtime.
This PR introduces
@overloads tocsfield()that allow Pyright to ensure that:Constfields that are provided now raise errors (as these must only be provided in the declaration)Defaultfields can be provided but do not have to (as the default value may be overriden)This PR includes the migration to uv and the version bump to 0.8.0 found here: #37.
BREAKING CHANGES
This PR introduces breaking changes, thus the version has been bumped to 0.8.0.
Defaultfields are only treated as optional if they have an explicit (and redundant)default=marker. A wrapper methodcsdefault_field()has been provided for convenience.Defaultfield must have thekw_only=marker and must be provided by keyword.